package com.ourcraft.informationcollectionsystem.controller.province;

import com.ourcraft.informationcollectionsystem.utils.response.Result;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("province/systemMonitor/")
@RestController
@CrossOrigin()
public class SystemMonitorController {
    @GetMapping("systemInfo")
    public Result<Map<String,Double>> systemInfo(HttpServletRequest request) {
        Map<String,Double> systemUsage = new HashMap<>();
        systemUsage.put("cpuUsage",0.5);
        systemUsage.put("memoryUsage",0.5);
        return Result.success(systemUsage);
    }
}
